{config_load file="lang/$language/lang_$language.conf" section="login"}
{config_load file="lang/$language/lang_$language.conf" section="create_account"}
{config_load file="lang/$language/lang_$language.conf" section="antispam"}
{if $info_message}
	<div class="headerError border_radius_6">
		{$info_message|replace:'<font color="#ff0000"><b>ACHTUNG:</b></font>':''|replace:'<font color="#ff0000"><b>FEHLER:</b></font>':''}
	</div>
{/if}
{if $error}
	<div class="headerError">{$error}</div>
{/if}
<h2>{#heading_login#}</h2>
{if $account_option=='account' or $account_option=='both'}
    {$FORM_LOGIN_ACTION}
		<br />
		{#text_returning#}
		{if $ANTISPAMCODEACTIVE == 'true'}
			<b>{#text_antispam#}</b>{$ANTISPAMCODEQUESTION}<br />
			<b>{#text_antispam_input#}</b>  {$INPUT_ANTISPAMCODE}
			{$ANTISPAMCODEID}
			<br />
		{/if}
		<dl>
			<dt class="w150">{#text_email#}</dt>
			<dd>{$INPUT_MAIL}</dd>
		</dl>
		<dl>
			<dt class="w150">{#text_password#}</dt>
			<dd>{$INPUT_LOGIN_PASSWORD}</dd>
		</dl><br /><br />
		<dl>
			<dt class="w150">{$BUTTON_LOGIN}</dt>
			<dd><a href="{$LINK_LOST_PASSWORD}">{#text_lost_password#}</a></dd>
		</dl>           
	{$FORM_LOGIN_END}
{/if}
{if $account_option=='both' or $account_option=='guest'}
<br /><hr />
<h2>{#title_guest#}</h2>
	{#text_guest#}<br /><br />
	{$BUTTON_GUEST}
{/if}

<br /><hr />

<h2>{#heading_create_account#}</h2>

{$FORM_ACTION}
	<div class="inputRequirement">{#text_must#}</div>
	<fieldset class="account">
		<legend>{#title_personal#}</legend>
		{if $gender=='1'}	
		<dl>
			<dt class="w200">{#text_gender#}</dt>
			<dd>{$INPUT_MALE} | {$INPUT_FEMALE}</dd>
		</dl>
		{/if}
		<dl>
			<dt class="w200">{#text_firstname#}</dt>
			<dd>{$INPUT_FIRSTNAME}</dd>
		</dl>
		<dl>
			<dt class="w200">{#text_lastname#}</dt>
			<dd>{$INPUT_LASTNAME}</dd>
		</dl>
		{if $birthdate=='1'}
			<dl>
				<dt class="w200">{#text_birthdate#}</dt>
				<dd>{$INPUT_DOB}</dd>
			</dl>
		{/if}
		<dl>
			<dt class="w200">{#text_email#}</dt>
			<dd>{$INPUT_EMAIL}</dd>
		</dl>
	</fieldset>
	
	{if $company=='1'}
		<fieldset class="account">
			<legend>{#title_company#}</legend>
			<dl>
				<dt class="w200">{#text_company#}</dt>
				<dd>{$INPUT_COMPANY}</dd>
			</dl>
			{if $vat=='1'}
				<dl>
					<dt class="w200">{#text_ustid#}</dt>
					<dd>{$INPUT_VAT}</dd>
				</dl>
			{/if}
		</fieldset>
	{/if}

	<fieldset class="account">
		<legend>{#title_address#}</legend>
		<dl>
			<dt class="w200">{#text_street#}</dt>
			<dd>{$INPUT_STREET}{$INPUT_STREET_NUM}</dd>
		</dl>
		{if $suburb=='1'}
			<dl>
				<dt class="w200">{#text_suburb#}</dt>
				<dd>{$INPUT_SUBURB}</dd>
			</dl>
		{/if}
		<dl>
			<dt class="w200">{#text_code_city#}</dt>
			<dd>{$INPUT_CODE} {$INPUT_CITY}</dd>
		</dl>
		{if $SELECT_COUNTRY_ENABLE != 'false'}
		<br />
		<dl>
			<dt class="w200">{#text_country#}</dt>
			<dd>{$SELECT_COUNTRY}</dd>
		</dl>
		{else}
			{$SELECT_COUNTRY}
		{/if}
		{if $state=='1'}
		<br />
			<dl>
				<dt class="w200">{#text_state#}</dt>
				<dd><span id="state">{$INPUT_STATE}</span></dd>
			</dl>
			{$SELECT_COUNTRY_JS}
		{/if}
	</fieldset>

	<fieldset class="account">
		<legend>{#title_contact#}</legend>
		<dl>
			<dt class="w200">{#text_tel#}</dt>
			<dd>{$INPUT_TEL}</dd>
		</dl>
		<dl>
			<dt class="w200">{#text_fax#}</dt>
			<dd>{$INPUT_FAX}</dd>
		</dl>
	</fieldset>

	<fieldset class="account">
		<legend>{#title_password#}</legend>
		<dl>
			<dt class="w200">{#text_password#}</dt>
			<dd>{$INPUT_PASSWORD}</dd>
		</dl>
		<dl>
			<dt class="w200">{#text_confirmation#}</dt>
			<dd>{$INPUT_CONFIRMATION}</dd>
		</dl>
		<dl>
			<dt id="passwordDescription" class="w200">{#text_pw_secure_desc#}</dt>
			<dd><div id="passwordStrength" class="strength0"></div></dd>
		</dl>
	</fieldset>

	<fieldset class="account">
		<legend>{#title_newsletter#}</legend>
		{$INPUT_NEWSLETTER} {#receive_newsletter#}<br /><br />
	</fieldset>
{if $TRUSTED_DSG != 'false'}
	<fieldset class="account">
		<legend>{#title_datensg#}</legend>
		<div>{$DSG}</div>
		<div class="red">
			{$DATENSG_CHECKBOX} {#text_accept_datensg#}{$BUTTON_PRINT}
		</div><br />
	</fieldset><br />

{/if}
	<div align="right" id="create_account_button">{$BUTTON_SUBMIT}</div>	
{$FORM_END}



<script type="text/javascript">
function passwordStrength(password){
	var desc = new Array();
	desc[0] = "{#text_pw_secure_0#}";
	desc[1] = "{#text_pw_secure_1#}";
	desc[2] = "{#text_pw_secure_2#}";
	desc[3] = "{#text_pw_secure_3#}";
	desc[4] = "{#text_pw_secure_4#}";
	desc[5] = "{#text_pw_secure_5#}";

	var score   = 1;
	if (password.length > 6) score++;
	if ((password.match(/[a-z]/)) && (password.match(/[A-Z]/))) score++;
	if (password.match(/\d+/)) score++;
	if (password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) )	score++;
	if (password.length > 12) score++;
	document.getElementById("passwordDescription").innerHTML = desc[score];
	document.getElementById("passwordStrength").className = "strength" + score;
}
</script>